<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="tag[@name='element']">
		<span class="element" contenteditable="false" type="element"
			expression="{parameter[@name='expression']/@value}">
			<b><xsl:value-of select="parameter[@name='expression']/@value"/></b>
		</span>
	</xsl:template>
	
	<xsl:template match="tag[@name='loop']">
		<span class="loop" contenteditable="false" type="loop"
			expression="{parameter[@name='loopExpression']}">
			<b><xsl:value-of select="parameter[@name='loopExpression']"/></b>( 
			<span class="loopBody droppable" contenteditable="true">
				<xsl:apply-templates select="body" />
			</span> )
		</span>
	</xsl:template>
	
	<xsl:template match="tag[@name='expression']">
		<span class="expression" contenteditable="false" type="expression">
			=<input type="text" value="{parameter[@name='expression']/@value}"/>
		</span>
	</xsl:template>
	
	<xsl:template match="tag[@name='condition']">
		<span class="condition" contenteditable="false" type="condition">
			if <input type="text" value="{parameter[@name='condition']}"/>
			<span class="conditionBody droppable" contenteditable="true">
				<xsl:apply-templates select="ifbody" />
			</span>
		</span>
	</xsl:template>
</xsl:stylesheet>